package com.yaoxuguang.concurrence.synchronizedpackage.LockUnpenByException;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.synchronizedpackage.LockUnpenByException
 * @Description: 抛异常时，锁自动释放
 * @date 2018年12月18日10:45
 */
public class ThreadB extends  Thread{
    private Service service;

    public ThreadB(Service service) {
        this.service = service;
    }

    @Override
    public void run() {
        service.service("b");
    }
}
